package com.telenav.ui;

import android.app.Activity;
import android.content.Context;

public class AndroidUiHelper {
	
	private static AndroidUiHelper instance = new AndroidUiHelper();
	protected Context context;
	private Activity activity;
	
	private AndroidUiHelper()
	{
	}
	
    public void init(Object context)
    {
        this.context = (Context)context;
        this.activity = (Activity)context;
    }
	
	public static AndroidUiHelper getInstance()
	{
		return instance;
	}
	
    public AndroidView getCurrentScreen()
    {
    	return ((AndroidActivity)context).getCurrentScreen();
    }
    
    public Context getContext()
    {
    	return context;
    }
    
    public Activity getActivity()
    {
    	return activity;
    }
    
    public void showScreen(AndroidView screen)
    {
    	((AndroidActivity)context).showScreen(screen);
    }
    
    public void runOnUiThread(Runnable runnable)
    {
    	((AndroidActivity)context).runOnUiThread(runnable);
    }

}
